<?php
namespace app\common\model;
use think\Model;
class Type extends Model
{  
	protected $autoWriteTimestamp=true;
	//获取所有的类型并分类
	public function getAllP()
	{
		$result=$this->order('orderT desc')->paginate(4);
		return $result;
	}
    //获取所有的类型
    public function getAll()
	{
		$result=$this->order('orderT desc')->select();
		return $result;
	}
    //根据id删除类型
	public function deleteByCondition($where)
	{
		$result=$this->where($where)->delete();
		return $result;
	}
   

    //条件获取一个类型信息
	public function findOne($where)
	{
        return $this->where($where)->find();
	}


}